]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
altTab: Fix window-switcher on HiDPI displays
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 25 Nov 2015 23:04:11 +0000 (00:04 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 2 Dec 2015 09:31:36 +0000 (10:31 +0100)
We need to take the scale factor into account to avoid tiny window
previews on HiDPI.

https://bugzilla.gnome.org/show_bug.cgi?id=758676

js/ui/altTab.js

index 8765f19111e7699cf3bc57d6ace492351905c4ee..7029bf75afc6132003b74fb2873e159e3dc70517 100644 (file)
@@ -685,15 +685,17 @@ const WindowIcon = new Lang.Class({
 
         this._icon.destroy_all_children();
 
+        let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
+
         switch (mode) {
             case AppIconMode.THUMBNAIL_ONLY:
                 size = WINDOW_PREVIEW_SIZE;
-                this._icon.add_actor(_createWindowClone(mutterWindow, WINDOW_PREVIEW_SIZE));
+                this._icon.add_actor(_createWindowClone(mutterWindow, size * scaleFactor));
                 break;
 
             case AppIconMode.BOTH:
                 size = WINDOW_PREVIEW_SIZE;
-                this._icon.add_actor(_createWindowClone(mutterWindow, WINDOW_PREVIEW_SIZE));
+                this._icon.add_actor(_createWindowClone(mutterWindow, size * scaleFactor));
 
                 if (this.app)
                     this._icon.add_actor(this._createAppIcon(this.app,
@@ -705,7 +707,7 @@ const WindowIcon = new Lang.Class({
                 this._icon.add_actor(this._createAppIcon(this.app, size));
         }
 
-        this._icon.set_size(size, size);
+        this._icon.set_size(size * scaleFactor, size * scaleFactor);
     },
 
     _createAppIcon: function(app, size) {